<!DOCTYPE html>
<html lang="en-us">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title> 作业7 </title>
  
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="all,follow">
  <meta name="googlebot" content="index,follow,snippet,archive">
  <meta property="og:title" content="作业7" />
<meta property="og:description" content="作业6 1、Program with machine language according to the following c. int_8 a = 1; int_8 c = a &#43; 3; 1）Write your assembly code &amp; machine code LOD # 1 –&gt; STO X –&gt; LOD X –&gt; ADD#3 –&gt; STO Y –&gt; HLT
2）Explain machine code execution with the fetch-decode-execute cycle Main memory –&gt; fetch instruction –&gt; Decode instruction –&gt; Registers –&gt; Get data –&gt; Execute the instruction –&gt; Main memory" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://beikenken.gitee.io/post/%E4%BD%9C%E4%B8%9A7/" />
<meta property="article:published_time" content="2020-10-19T19:37:06+08:00" />
<meta property="article:modified_time" content="2020-10-19T19:37:06+08:00" />

  <meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="作业7"/>
<meta name="twitter:description" content="作业6 1、Program with machine language according to the following c. int_8 a = 1; int_8 c = a &#43; 3; 1）Write your assembly code &amp; machine code LOD # 1 –&gt; STO X –&gt; LOD X –&gt; ADD#3 –&gt; STO Y –&gt; HLT
2）Explain machine code execution with the fetch-decode-execute cycle Main memory –&gt; fetch instruction –&gt; Decode instruction –&gt; Registers –&gt; Get data –&gt; Execute the instruction –&gt; Main memory"/>

  
  
  
  <link rel="stylesheet" href="https://beikenken.gitee.io/css/style-white.css">
  
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  

  
<link rel="icon" type="image/png" href="https://beikenken.gitee.io/images/favicon.ico" />

  
</head>
<body class="max-width mx-auto px3 ltr">
  <div class="content index py4">

    <header id="header">
  <a href="https://beikenken.gitee.io">
  
    <div id="logo" style="background-image: url(https://beikenken.gitee.io/images/logo.png)"></div>
  
  <div id="title">
    <h1>【18342131】的软导作业索引页   全部博客:beikenken.gitee.io/post</h1>
  </div>
  </a>
  <div id="nav">
    <ul>
      <li class="icon">
        <a href="#"><i class="fas fa-bars fa-2x"></i></a>
      </li>
      
    </ul>
  </div>
</header>
  

    
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">

  <div class="content" itemprop="articleBody">
  
    <h1 id="作业6">作业6</h1>
<h2 id="1program-with-machine-language-according-to-the-following-c-int_8-a--1-int_8-c--a--3">1、Program with machine language according to the following c. int_8 a = 1; int_8 c = a + 3;</h2>
<h3 id="1write-your-assembly-code--machine-code">1）Write your assembly code &amp; machine code</h3>
<p>LOD # 1 –&gt; STO X –&gt; LOD X –&gt; ADD#3 –&gt; STO Y –&gt; HLT</p>
<h3 id="2explain-machine-code-execution-with-the-fetch-decode-execute-cycle">2）Explain machine code execution with the fetch-decode-execute cycle</h3>
<p>Main memory –&gt; fetch instruction –&gt; Decode instruction –&gt; Registers –&gt; Get data –&gt; Execute the instruction –&gt; Main memory</p>
<h3 id="3explain-functions-about-ir-pc-acc-registers-in-a-cpu">3）Explain functions about IR, PC, ACC registers in a CPU</h3>
<p>IR：指令寄存器，用来保存当前正在执行的一条指令</p>
<p>PC：程序计数器，存放下一条指令在内存中的地址</p>
<p>ACC：累加寄存器，功能是当运算器的算术逻辑单元(ALU)执行全部算术和逻辑运算时，为ALU提供一个工作区，暂时存放ALU运算结果</p>
<h3 id="4explain-physical-meaning-about-vars-a--c-in-a-machine">4）Explain physical meaning about vars a &amp; c in a machine</h3>
<p>变量a 和 c 在机器中被映射成数据的地址。在指令执行过程中，会根据需要寻址，得到存储在这个地址中的数值，即变量a 和 c存储的值。</p>
<h2 id="2简答题">2、简答题</h2>
<h3 id="1what-are-stored-in-memory">1）What are stored in memory?</h3>
<p>指令和数据</p>
<h3 id="2can-a-data-or-a-instruction-stored-in-the-same-place">2）Can a data or a instruction stored in the same place?</h3>
<p>可以</p>
<h3 id="3-explain-instruction-format-with-example-instructions">3） Explain Instruction Format with example instructions.</h3>
<p>例：ADD X : 00000000 10000000</p>
<p>上述16位长度指令中，[7:0]是操作数，表示数值或地址; [11:8]是操作码；第12位为寻址模式，1表示操作数为数值，0表示操作数为是该地址的内容。例子中为0，表示操作数是该地址的内容，这条指令表示加上内存地址为128中的数据。</p>
<h2 id="3解释以下词汇">3、解释以下词汇</h2>
<h3 id="1汇编语言assembly-language">1）汇编语言（Assembly Language）</h3>
<p>A language that uses mnemonic codes（助记忆符号） to represent machine language instructions.</p>
<p>汇编语言是一种利用助记忆符号来呈递机器语言的语言。</p>
<h3 id="2编译compiler">2）编译（Compiler）</h3>
<p>A compiler is computer software that primarily translates computer code from a high-level programming language to machine code to create an executable program.</p>
<p>编译器是一种计算机软件，它主要将计算机代码从高级编程语言转换为机器代码，以创建可执行程序。</p>
<h3 id="3命令式语言imperative-programming">3）命令式语言（Imperative programming）</h3>
<p>In computer science, imperative programming is a programming paradigm that uses statements that change a program&rsquo;s state. In much the same way that the imperative mood in natural languages expresses commands, an imperative program consists of commands for the computer to perform. Imperative programming focuses on describing how a program operates.</p>
<p>在计算机科学中，命令式编程是一种编程范例，它使用改变程序状态的语句。就像自然语言中的祈使语气表达命令一样，命令式程序由计算机执行的命令组成。命令式编程的重点是描述程序如何运行。</p>
<h3 id="4函数编程语言functional-programming">4）函数编程语言（Functional programming）</h3>
<p>In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.</p>
<p>在计算机科学中，函数式编程是一种编程范式————一种构建计算机程序结构和元素的方式————将计算视为数学函数的评估，并避免状态和可变数据的变化。</p>
<h3 id="5过程式编程procedural-programming">5）过程式编程（Procedural programming）</h3>
<p>Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call.</p>
<p>过程编程是基于过程调用的概念从结构化编程中派生出来的一种编程范式。</p>

  
  </div>
</article>


    <footer id="footer">
  <div class="footer-left">
    Copyright  &copy; 2021  【18342131】的软导作业索引页   全部博客:beikenken.gitee.io/post 
  </div>
  <div class="footer-right">
    <nav>
      <ul>
        
      </ul>
    </nav>
  </div>
</footer>


  </div>
  
</body>

<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/js/main.js"></script>
</html>
